<!DOCTYPE HTML>
<html>
<head>
<title>Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Modern Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />

<link href="__PUBLIC__/Dist/css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="__PUBLIC__/Admin/css/style.css" rel='stylesheet' type='text/css' />
<link href="__PUBLIC__/Admin/css/font-awesome.css" rel="stylesheet"> 
<!-- jQuery -->
<script src="__PUBLIC__/Dist/js/jquery.min.js"></script>
<script src="__PUBLIC__/js/function.js"></script>
<!----webfonts--->

<!-- Bootstrap Core JavaScript -->
<script src="__PUBLIC__/Dist/js/bootstrap.min.js"></script>
</head>
<body id="login">
  <div class="login-logo">
    <a href="#"><img src="__PUBLIC__/Admin/images/logo.png" alt=""/></a>
  </div>
  <h2 class="form-heading">login</h2>
  <div class="app-cam">
  	<form id="login-form" action="<{:U('login')}>" method="post" >
  		  <input type="text" class="text" placeholder="登录名" name="username" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '登录名';}">
  		  <input type="password" value="" name="password" placeholder="请输入密码" onfocus="this.value = '';">
  		  <div class="submit"><input type="submit" value="Login"></div>
  	</form>
  </div>
   <div class="copy_layout login">
      <p>尾部</p>
   </div>
   <script>
   $(function(){
      var form  = $("#login-form");
      var username = form.children().eq(0);
      var password = form.children().eq(1);
      form.submit(function (){
        var resUserName = checkRule(username,/^[\u4E00-\u9FA5a-zA-Z0-9_]{3,20}$/);
        if(!resUserName){
          return false;
        }
        var resPassWord = checkRule(password,/^[a-zA-Z]\w{5,17}$/);

        if(!resPassWord){
          alert('密码必须以字母开头，长度在6-18之间，只能包含字符、数字和下划线');
          return false;
        }
        
      });
   });

   </script>
</body>
</html>
